package com.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.model.Singular;

public class SingularDAO extends GenericDAO<Singular> {

	private static final long serialVersionUID = 1L;

	public SingularDAO() {
		super(Singular.class);
	}

	public Singular findSingularByNumero(String numero) {
		Map<String, Object> parameters = new HashMap<String, Object>();
		parameters.put("numero", numero);

		return super.findOneResult(Singular.FIND_BY_NUMERO, parameters);
	}
	
	public Singular findSingularByNome(String nome){
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("nome", nome);     
 
        return super.findOneResult(Singular.FIND_BY_NOME, parameters);
    }

	public List<Singular> getAll() {
		return super.getAll(Singular.FIND_ALL);
	}
}